package com.stx.test.classAndObject;

import java.util.Scanner;

/**
 * packageName com.stx.test
 *
 * @author YangYi
 * @className HeroDemo
 * @date 2025/9/11
 * @description TODO
 */
public class HeroDemo {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        // 创建对象
        Hero hero = new Hero();
        hero.name = "奥特曼";
        hero.blood = 100;
        hero.blue = 25;
        hero.speed = 55;

        while (true){
            int choose = scanner.nextInt();
            switch (choose){
                case 1:{
                    hero.attack();
                    break;
                }
                case 2:{
                    hero.addBlue();
                    break;
                }
                default:{
                    System.out.println("输入错误");
                    break;
                }
            }
        }
    }
}
